<template>
    <div class="search-con" @click="myEvent()">
        <div  class="pro-mes">
            <div class="pro-img">
                <!-- <img v-lazy="pic" alt=""> -->
                <legend-image :pic="pic" :options="{w:'90',h:'90'}" :class="'needsclick'" :isJD="parmas.prodSource=='JD'"/>
                <div class="haitao" v-if="parmas.goodsType == 'overseas'">
                    <img src="@/assets/images/haitao-small.png" alt="" />>
                </div>
                <!-- <i class="type-tip" v-if="parmas.prodType == 'P'">普通商品</i> -->
                <i class="type-tip" v-if="parmas.prodType == 'G'">团购商品</i>
                <i class="type-tip" v-if="parmas.prodType == 'S'">二手商品</i>
                <i class="type-tip" v-if="parmas.prodType == 'D'">打折商品</i>
            </div>
            <div class="pro-name">
                <div class="name">{{name}}</div>
                <div class="pro-price">
                    <span class="price">￥<em class="now">{{Money(money)[0]}}</em>.{{Money(money)[1]}}</span>
                    <span class="dis" v-for="(item, index) in parmas.description" :key="index">{{item}}</span>
                </div>
                <slot name=proCom></slot>
                <!-- <div class="pro-com"><small class="com-item">6w评论</small><small class="com-item">99%好评</small></div> -->
            </div>
        </div>
    </div>
</template>

<script>
import cash from 'utils/tool'
import legendImage from 'components/legendImage/legendImage';
 export default {
   data () {
     return {
         Money: cash
     }
   },
   props: {
    parmas:Object,
    pic: String,
    name: String,
    money:Number
   },
   methods: {
      myEvent() {
          this.$emit("myEvent",this.parmas);  
       }  
   },
   components: {
       legendImage
   }
 }
</script>


<style src="../../assets/css/search.css" scoped></style>

<style lang="stylus" scoped>

.pro-list .pro-box .pro-price .dis {
  padding: 0 3px 0 2px;
  color: #ffffff;
  border-right: 1px dotted #ffffff;
  margin-left: 5px;
  font-size: 10px;
  vertical-align: top;
  display: inline-block;
  height: 14px;
  line-height: 14px;
  margin-top: 1px;
}

.pro-img {
    position: relative;
    .haitao {
        position: absolute;
        top: 0;
        left : 0px;
        width: 30px !important;
        height: 30px !important;
    }
}
</style>

